import { request } from "@/utils/http";
import { ReaHospitalList, ReqHospitalShow, ReqHospitallistListAll, ReqprovinceList, getdepartmentValueList } from "./model/HospitalListType";

// 获取医院分页列表
export function hospitalList({page,limit,...aug}:ReaHospitalList){
    return request.get<any,ReqHospitallistListAll>(`/admin/hosp/hospital/${page}/${limit}`)
}
// 获取省
export function getParameters(){
    return request.get<any,ReqprovinceList>("/admin/cmn/dict/findByDictCode/province")
}
// 获取市
export function getCityValue(id:number){
    return request.get<any,ReqprovinceList>(`/admin/cmn/dict/findByParentId/${id}`)
}
// 获取区
export function getdistrictValue(id:number){
    return request.get<any,ReqprovinceList>(`/admin/cmn/dict/findByParentId/${id}`)
}
// 获取医院等级
export function getHoapitalType(parentId:number){
    return request.get<any,ReqprovinceList>(`/admin/cmn/dict/findByParentId/${parentId}`)
}
// 上下线
export function changeValue(status:number,id:string){
    return request.get<any,null>(`/admin/hosp/hospital/updateStatus/${id}/${status}`)
}
// 获取医院详细信息
export function getHospitalItem(id:string){
    return request.get<any,ReqHospitalShow>(`/admin/hosp/hospital/show/${id}`)
}
// 获取科室分页列表数据
export function ReqParameters(hoscode:string){
    return request.get<any,getdepartmentValueList>(`/admin/hosp/department/${hoscode}`)

}